import { request } from '@/utils/request.js'



/**
 * @description: 静默登录注册（code 获得 openid）
 * @param {*} code 
 * @return {*}
 */
// 获取opid
const appauth = params => {
    return request({
        url: 'api/mp/auth?server=1',
        method: 'POST',
        data: params
    })
}

const teamlist = params => {
    return request({
        url: 'api/courcelv/teamlist',
        method: 'get',
        data: params
    })
}
// goods/category
const category = params => {
    return request({
        url: 'api/goods/category?server=1',
        method: 'get',
        data: params
    })
}
// list.
const good_list = params => {
    return request({
        url: 'api/goods/list?server=1',
        method: 'get',
        data: params
    })
}
//加入班级jointeam
const jointeam = params => {
    return request({
        url: 'api/courcelv/jointeam?server=1',
        method: 'get',
        data: params
    })
}
// list
const cour_list = params => {
    return request({
        url: 'api/courcelv/list?server=1',
        method: 'get',
        data: params
    })
}
//teamrank
const cour_teamrank = params => {
    return request({
        url: 'api/courcelv/teamrank?server=1',
        method: 'get',
        data: params
    })
}
//detail
const cour_detail = params => {
    return request({
        url: 'api/courcelv/detail?server=1',
        method: 'get',
        data: params
    })
}
 // submit
 const cour_submit = params => {
     return request({
         url: 'api/courcelv/submit?server=1',
         method: 'post',
         data: params
     })
 }
  // mygateinfo
 const cour_mygateinfo = params => {
     return request({
         url: 'api/courcelv/mygateinfo?server=1',
         method: 'get',
         data: params
     })
 }
 // today
 const cour_today = params => {
     return request({
         url: 'api/courcelv/today?server=1',
         method: 'get',
         data: params
     })
 }
module.exports = {
    appauth,
	teamlist,
	category,
	good_list,
	jointeam,
	cour_list,
	cour_teamrank,
	cour_detail,
	cour_submit,
	cour_mygateinfo,
	cour_today
}

